import  psutil as ps

def getinfo():
    c_info = ps.disk_usage("c:\\")
    print("磁盘的分区情况{}".format(ps.disk_partitions()))
    print("c盘的使用情况{}".format(ps.disk_usage("c:\\")))
    print("c盘的总大小{}\n使用率{}\n剩余空间{}".format(c_info.total,c_info.percent,c_info.free))

if __name__ == "__main__":
    getinfo()